<template>
  <div class="home">
		<home-header></home-header>
		<home-swiper :swiperList="swiperList"></home-swiper>
		<home-nav :imgsList="imgsList"></home-nav>
		<home-favourite :recommendList="recommendList"></home-favourite>
		<home-weekend :weekendList="weekendList"></home-weekend>
  </div>
</template>

<script>
	import {getHome} from '@/api'
	import HomeHeader from 'homebase/Header'
	import HomeSwiper from 'homebase/Swiper'
	import HomeNav from 'homebase/Nav'
	import HomeFavourite from 'homebase/Favourite'
	import HomeWeekend from 'homebase/Weekend'
	
export default {
  name: 'Home',
  data () {
    return {
			swiperList: [],
			imgsList: [],
			recommendList: [],
			weekendList: []
		}
  },
	components: {
		HomeHeader,
		HomeSwiper,
		HomeNav,
		HomeFavourite,
		HomeWeekend
	},
	created(){
		getHome().then( res=>{
			let {swiperList,iconList,recommendList,weekendList} = res;
			this.swiperList = swiperList;
			this.imgsList = iconList;
			this.recommendList = recommendList;
			this.weekendList = weekendList;
		})
	},
}
</script>

<style scoped>

</style>
